#Target
TgtFile = merch

SrcFile0 = merch
SrcFile1 = rptmerch

# App Source Paths
SrcDir = C:\softpay\ver30\SOURCE\MERCH

AppObjects = \
	$(OBJ_DIR)\$(SrcFile0).o  \
	$(OBJ_DIR)\$(SrcFile1).o  

# Compiler Options
MkIncludes = -J $(SDS_INCLUDES) -I $(ACT_INCLUDES) -I $(SP2_INCLUDES) 
COptions = $(GCOPTIONS) -c -O2 -bi -g+ -cpu ARM920T -Wrx -DK2 -DARM -o$(@)

#  Target Definition Library
$(LIB_DIR)\$(TgtFile).a : $(AppObjects)
	@$(RVCTBIN)\armar -r $(LIB_DIR)\$(TgtFile).a $(AppObjects)


$(OBJ_DIR)\$(SrcFile0).o : $(SrcDir)\$(SrcFile0).c \
		C:\softpay\ver30\SOURCE\INCLUDE\batch.h\
		C:\softpay\ver30\SOURCE\INCLUDE\trt.h\
		C:\softpay\ver30\SOURCE\INCLUDE\menufunc.h\
		C:\softpay\ver30\SOURCE\INCLUDE\confio.h\
		C:\softpay\ver30\SOURCE\INCLUDE\batmsg.h\
		C:\softpay\ver30\SOURCE\INCLUDE\passwd.h\
		C:\softpay\ver30\SOURCE\INCLUDE\tblutil.h\
		C:\softpay\ver30\SOURCE\INCLUDE\util.h\
		C:\softpay\ver30\SOURCE\INCLUDE\MIT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\check.h\
		C:\softpay\ver30\SOURCE\INCLUDE\gds.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ConfProto.h\
		C:\softpay\ver30\SOURCE\INCLUDE\merch.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msgfuncs.h\
		C:\softpay\ver30\SOURCE\INCLUDE\TCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\entry.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ui.h\
		C:\softpay\ver30\SOURCE\INCLUDE\Tran.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pfr.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msg.h\
		C:\softpay\ver30\SOURCE\INCLUDE\codesec.h\
		C:\softpay\ver30\SOURCE\INCLUDE\SPDebug.h\
		C:\softpay\ver30\SOURCE\INCLUDE\transact.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pwrfids.h 
	@echo COMPILING...$(SrcFile0).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile0).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

$(OBJ_DIR)\$(SrcFile1).o : $(SrcDir)\$(SrcFile1).c \
		C:\softpay\ver30\SOURCE\INCLUDE\MHT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\form.h\
		C:\softpay\ver30\SOURCE\INCLUDE\batmsg.h\
		C:\softpay\ver30\SOURCE\INCLUDE\passwd.h\
		C:\softpay\ver30\SOURCE\INCLUDE\PCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\list.h\
		C:\softpay\ver30\SOURCE\INCLUDE\tblutil.h\
		C:\softpay\ver30\SOURCE\INCLUDE\MIT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\HDT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\form2.h\
		C:\softpay\ver30\SOURCE\INCLUDE\fields.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ConfProto.h\
		C:\softpay\ver30\SOURCE\INCLUDE\scalls.h\
		C:\softpay\ver30\SOURCE\INCLUDE\rptmerch.h\
		C:\softpay\ver30\SOURCE\INCLUDE\txoinc.h\
		C:\softpay\ver30\SOURCE\INCLUDE\udt.h\
		C:\softpay\ver30\SOURCE\INCLUDE\recptfrm.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msgfuncs.h\
		C:\softpay\ver30\SOURCE\INCLUDE\TCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\entry.h\
		C:\softpay\ver30\SOURCE\INCLUDE\ui.h\
		C:\softpay\ver30\SOURCE\INCLUDE\pbatch.h\
		C:\softpay\ver30\SOURCE\INCLUDE\report.h\
		C:\softpay\ver30\SOURCE\INCLUDE\LCT.h\
		C:\softpay\ver30\SOURCE\INCLUDE\msg.h\
		C:\softpay\ver30\SOURCE\INCLUDE\codesec.h\
		C:\softpay\ver30\SOURCE\INCLUDE\SPDebug.h\
		C:\softpay\ver30\SOURCE\INCLUDE\print.h\
		C:\softpay\ver30\SOURCE\INCLUDE\transact.h 
	@echo COMPILING...$(SrcFile1).c
	@$(RVCTBIN)\armcc $(MkIncludes) $(COptions) $(SrcDir)\$(SrcFile1).c >errorList.txt  2>&1
	@type errorList.txt | FmtErrorArm.exe

